package com.orm.domain;

/**
 * 用户实体
 */
public class User{
    private Integer uid;   //用户id
    private String username;   //登陆用户名
    private String password;   //登陆密码
    private Integer credits;  //积分
    private String lastVisit;  //最后一次登陆时间
    private String  lastIp;   //最后一次登陆的ip

    public User() {
    }

    public User(Integer uid, String username, String password, Integer credits, String lastVisit, String lastIp) {
        this.uid = uid;
        this.username = username;
        this.password = password;
        this.credits = credits;
        this.lastVisit = lastVisit;
        this.lastIp = lastIp;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getCredits() {
        return credits;
    }

    public void setCredits(Integer credits) {
        this.credits = credits;
    }

    public String getLastVisit() {
        return lastVisit;
    }

    public void setLastVisit(String lastVisit) {
        this.lastVisit = lastVisit;
    }

    public String getLastIp() {
        return lastIp;
    }

    public void setLastIp(String lastIp) {
        this.lastIp = lastIp;
    }

    @Override
    public String toString() {
        return "User{" +
                "uid=" + uid +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", credits=" + credits +
                ", lastVisit='" + lastVisit + '\'' +
                ", lastIp='" + lastIp + '\'' +
                '}';
    }
}
